package com.zib.vread.downloadmanagedemo;

import android.content.Context;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;

import com.zib.vread.downloadmanagedemo.Update.UpdateManager;

public class MainActivity extends AppCompatActivity {
    private Context context = this;
    private UpdateManager manager;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        checkUpdate();
    }

    private void checkUpdate() {
        manager = new UpdateManager(context) {
            @Override
            public int getServiceVerCode() {
                return 2;
            }
        };
        manager.isUpdateVersion();
    }

    public void clickbutton(View view) {
        manager.unbindService();
    }
}
